load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "ingest",
    srcs = ["grpc_ingest.go"],
    importpath = "github.com/cockroachdb/cockroach/pkg/obsservice/obslib/ingest",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/obsservice/obslib",
        "//pkg/obsservice/obslib/transform",
        "//pkg/obsservice/obspb/opentelemetry-proto/collector/logs/v1:logs_service",
        "//pkg/util/log",
        "//pkg/util/timeutil",
    ],
)

go_test(
    name = "ingest_test",
    srcs = [
        "grpc_ingest_test.go",
        "ingest_integration_test.go",
        "main_test.go",
    ],
    data = glob(["testdata/**"]),
    embed = [":ingest"],
    deps = [
        "//pkg/base",
        "//pkg/obs",
        "//pkg/obsservice/obslib/obsutil",
        "//pkg/obsservice/obspb",
        "//pkg/obsservice/obspb/opentelemetry-proto/collector/logs/v1:logs_service",
        "//pkg/obsservice/obspb/opentelemetry-proto/common/v1:common",
        "//pkg/obsservice/obspb/opentelemetry-proto/logs/v1:logs",
        "//pkg/obsservice/obspb/opentelemetry-proto/resource/v1:resource",
        "//pkg/rpc",
        "//pkg/security/securityassets",
        "//pkg/security/securitytest",
        "//pkg/server",
        "//pkg/settings/cluster",
        "//pkg/testutils",
        "//pkg/testutils/serverutils",
        "//pkg/testutils/testcluster",
        "//pkg/util/leaktest",
        "//pkg/util/log",
        "//pkg/util/randutil",
        "//pkg/util/stop",
        "//pkg/util/timeutil",
        "@com_github_cockroachdb_datadriven//:datadriven",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_google_uuid//:uuid",
        "@com_github_kr_pretty//:pretty",
        "@com_github_stretchr_testify//require",
    ],
)
